<?php

defined('_JEXEC') or die('Restricted access');
?>
<script type="text/javascript">
function submitbutton( pressbutton ) {
        var form = document.getElementById('adminForm');
           alert(document.getElementById('task').value)
        if (pressbutton!=undefined) {
                document.getElementById('task').value=pressbutton;
             
        }
        
        if (typeof form.onsubmit == "function") {
                form.onsubmit();
        }
        form.submit();

}
</script>
<form action="index.php" method="post" name="adminForm" id="adminForm">

    <div id="elconfig-document">
        <div id="page-basic">
                <table class="admintable" cellspacing="1">
                <tbody>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(DEFAULT_CITY); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="default_city" value="<?php echo $this->elsettings->default_city; ?>" size="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(DEFAULT_COUNTRY); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="default_country" value="<?php echo $this->elsettings->default_country; ?>" size="15" />
                        </td>
                    </tr>
                        <tr>
                            <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(UNIT_DISTANCE); ?>
                                    </span>
                            </td>
                            <td valign="top">
                                <?php
                                    $showdets = array();
                                    $showdets[] = JHTML::_('select.option', 'mile', JText::_(MILE) );
                                    $showdets[] = JHTML::_('select.option', 'kM', JText::_(KILOMETER) );
                                    echo JHTML::_('select.genericlist', $showdets, 'distance_unit', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->distance_unit );
                                ?>
                            </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(PRICE_PER_UNIT_DISTANCE); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="price_per_unit_distance" value="<?php echo $this->elsettings->price_per_unit_distance; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                            <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(CURRENCY); ?>
                                    </span>
                            </td>
                            <td valign="top">
                                <?php
                                    echo $this->lists['currency'];
                                ?>
                            </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(CURRENCY_SYMBOL); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="currency_symbol" value="<?php echo htmlspecialchars($this->elsettings->currency_symbol); ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(DISCOUNT); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="discount" value="<?php echo $this->elsettings->discount; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(SURCHARGE_DATE); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="surcharge_by_dates" value="<?php echo $this->elsettings->surcharge_by_dates; ?>" size="50"  />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(MPV_PRICE); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="mpv_price" value="<?php echo $this->elsettings->mpv_price; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(EIGHTSEAT_PRICE); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="seat8_price" value="<?php echo $this->elsettings->seat8_price; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(INFANT_SEAT); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="infant_seat_price" value="<?php echo $this->elsettings->infant_seat_price; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(CHILD_PRICE); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="child_seat_price" value="<?php echo $this->elsettings->child_seat_price; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(BOOSTER_SEAT); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="booster_seat_price" value="<?php echo $this->elsettings->booster_seat_price; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(COST_PER_CALL); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="cost_per_call" value="<?php echo $this->elsettings->cost_per_call; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(PREPAYMENT); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="prepayment" value="<?php echo $this->elsettings->prepayment; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(MIN_DISTANCE); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="minmil" value="<?php echo $this->elsettings->minmil; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(MIN_DIST_PRICE); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="minprice" value="<?php echo $this->elsettings->minprice; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(PICKUP_CHARGE); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="pick_up_charge" value="<?php echo $this->elsettings->pick_up_charge; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                            <?php echo JText::_(ENABLE_PAYPAL); ?>
                                    </span>
                            </td>
                            <td valign="top">
                                 <?php
                                                    $showdets = array();
                                                    $showdets[] = JHTML::_('select.option', 1, JText::_('YES'));
                                                    $showdets[] = JHTML::_('select.option', 0, JText::_('NO'));
                                                    echo JHTML::_('select.genericlist', $showdets, 'paypal_enabled', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->paypal_enabled);
                                                ?>
                            </td>
                    </tr>
                     <tr>
                                                <td width="300" class="key">
                                                    <span class="editlinktip">
                                                    <?php echo JText::_(TEST_MODE); ?>
                                                </span>
                                            </td>
                                            <td valign="top">
                                                <?php
                                                    $showdets = array();
                                                    $showdets[] = JHTML::_('select.option', 1, JText::_('YES'));
                                                    $showdets[] = JHTML::_('select.option', 0, JText::_('NO'));
                                                    echo JHTML::_('select.genericlist', $showdets, 'paypal_test_mode', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->paypal_test_mode);
                                                ?>
                                                </td>
                                            </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                          ssssss  <?php echo JText::_(PAYPAL_EMAIL); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="paypal_email" value="<?php echo $this->elsettings->paypal_email; ?>" size="25" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(GMAP_KEY); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="gmap_key" value="<?php echo $this->elsettings->gmap_key; ?>" size="90" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(MAP_WIDTH); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="map_width" value="<?php echo $this->elsettings->map_width; ?>" size="15" maxlength="15" /> px
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(MAP_HEIGHT); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="map_height" value="<?php echo $this->elsettings->map_height; ?>" size="15" maxlength="15" /> px
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(MAP_ACTIVE); ?>
                                    </span>
                            </td>
                        <td valign="top">
                               <?php
                               $mapactive = array();
                                                    $mapactive[] = JHTML::_('select.option', 0, JText::_('NO'));
                                                    $mapactive[] = JHTML::_('select.option', 1, JText::_('YES'));
                                                    echo JHTML::_('select.genericlist', $mapactive, 'map_active', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->map_active);
                                            
                               ?>
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(MAP_ZOOM); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="map_zoom" value="<?php echo $this->elsettings->map_zoom; ?>" size="15" maxlength="15" />
                        </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(DIRECTION_WIDTH); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="dir_width" value="<?php echo $this->elsettings->dir_width; ?>" size="15" maxlength="15" /> px
                        </td>
                    </tr>
                    
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(DIRECTION_HEIGHT); ?>
                                    </span>
                            </td>
                        <td valign="top">
                                <input type="text" name="dir_height" value="<?php echo $this->elsettings->dir_height; ?>" size="15" maxlength="15" /> px
                        </td>
                    </tr>
                    <tr>
                            <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(MAP_ON_RIGHT); ?>
                                    </span>
                            </td>
                            <td valign="top">
                                <?php
                                    $showdets = array();
                                    $showdets[] = JHTML::_('select.option', 0, JText::_( 'NO' ) );
                                    $showdets[] = JHTML::_('select.option', 1, JText::_( 'YES' ) );
                                    echo JHTML::_('select.genericlist', $showdets, 'map_on_right', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->map_on_right );
                                ?>
                            </td>
                    </tr>
                    <tr>
                        <td width="300" class="key">
                                    <span class="editlinktip">
                                            <?php echo JText::_(CONTACT_INFO); ?>
                                    </span>
                            </td>
                        <td valign="top">
                            <?php
                            // parameters : areaname, content, hidden field, width, height, rows, cols
                            echo $this->editor->display( 'contact_info',  $this->elsettings->contact_info, '100%;', '250', '50', '20', array('pagebreak') ) ;
                            ?>
                        </td>
                    </tr>
                </tbody>
        </table>
            <?php echo $this->getToolbar(); ?>
<!--            <button type="submit" class="submit" >
        	    <?php echo JText::_(SAVE) ?>
        	</button>-->

        </div>
</div>
<div class="clr"></div>
            <a href="?option=com_taxibooking">
        	<img src="images/toolbar/icon-32-cancel.png" alt="<?php echo JText::_(CANCEL) ?>"/>
        	    <?php// echo JText::_('CANCEL') ?>
        	
            </a>
<?php echo JHTML::_( 'form.token' ); ?>
<input type="hidden" name="task" id="task" value="save">
<input type="hidden" name="id" value="1">
<input type="hidden" name="lastupdate" value="<?php echo $this->elsettings->lastupdate; ?>">
<input type="hidden" name="option" value="com_taxibooking">
<input type="hidden" name="controller"  value="settings">
</form>